package com.hjb.config;

/**
 * @author HuJiaBing
 * @date 2025/7/3 19:20
 * @description
 */
public class DatasourceRouteKeyHolder {
    private static final ThreadLocal<String> DATA_SOURCE_ROUTE_KEY = new ThreadLocal<>();

    public static void setDataSourceRouteKey(String key) {
        DATA_SOURCE_ROUTE_KEY.set(key);
    }

    public static String getDataSourceRouteKey() {
        return DATA_SOURCE_ROUTE_KEY.get();
    }

    public static void clearDataSourceKey() {
        DATA_SOURCE_ROUTE_KEY.remove();
    }
}
